﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

using Microsoft.AspNetCore.DataProtection.KeyManagement;
using Microsoft.AspNetCore.Http.HttpResults;

using OfficialWeb.Core;

using SqlSugar;

namespace OOS.Core.Address
{
    /// <summary>
    /// 地址管理
    /// </summary>
    [SugarTable("address_book")]
    public class AddressBook: IdAndDataAndIsDeletedBase
    {
        /// <summary>
        /// 用户id
        /// </summary>
        [SugarColumn(ColumnName = "user_id")]
        public int UserId { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(ColumnName = "name")]
        public String Name { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [SugarColumn(ColumnName = "phone")]
        public String Phone {  get; set; }
        /// <summary>
        /// 省级区划编号
        /// </summary>
        [SugarColumn(ColumnName = "province_code")]
        public String ProvinceCode { get; set; }
        /// <summary>
        /// 省级名称
        /// </summary>
        [SugarColumn(ColumnName = "province_name")]
        public String ProvinceName { get; set; }
        /// <summary>
        /// 市级区划编号
        /// </summary>
        [SugarColumn(ColumnName = "city_code")]
        public String CityCode { get; set; }
        /// <summary>
        /// 市级名称
        /// </summary>
        [SugarColumn(ColumnName = "city_name")]
        public String CityName { get; set; }
        /// <summary>
        /// 区级区划编号
        /// </summary>
        [SugarColumn(ColumnName = "district_code")]
        public String DistrictCode { get; set; }
        /// <summary>
        /// 区级名称
        /// </summary>
        [SugarColumn(ColumnName = "district_name")]
        public String DistrictName { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        [SugarColumn(ColumnName = "detail")]
        public String Detail {  get; set; }
        /// <summary>
        /// 是否是默认地址 0 否 1是
        /// </summary>
        [SugarColumn(ColumnName = "is_default")]
        public Boolean IsDefault { get; set; }
    }
}
